package neu.soft.message;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.stereotype.Component;

@Component
public interface MessageSource {
    @Output("purchase-common")
    MessageChannel confirmPurchase();

    @Output("check-purchase")
    MessageChannel checkPurchase();

    @Output("confirm-purchase-in")
    MessageChannel confirmPurchaseIn();

    // 收到货物调拨单并处理完成后向dispatch_service确认
    @Output("distribute-common")
    MessageChannel confirmDistribute();

    // 完成出库操作后确认
    @Output("out-common")
    MessageChannel confirmOut();

    @Output("out-common-1")
    MessageChannel confirmOut1();

    @Input("create-purchaseOrder")
    SubscribableChannel createPurchaseOrder();

    @Input("create-entryOrder")
    SubscribableChannel createEntryOrder();

    @Input("create-distributeOrder")
    SubscribableChannel createDistributeOrder();

    @Input("listen-packageSend")
    SubscribableChannel listenPackageSend();
}
